<?php 

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#serie-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<div class="form">
<div class="row">

<p> Selecione o aluno para a orientação </p>
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'alunos-form',
	'enableAjaxValidation'=>false,
)); ?>


<?php

$this->widget('zii.widgets.grid.CGridView', array(
        'id'=>'alunos-grid',
        'dataProvider'=>$model->search(),
    'selectableRows' => 1,
	'summaryText' => '',
	'filter'=>$model,
        'columns'=>array(
        array('id' => 'selectedIds',
                        'class'=>'CCheckBoxColumn',    
	),
		'nome',
		'email',
		'telefone',
		
))); ?>
</div>

<p>Selecione o aluno e clique abaixo para orienta-lo</p>
	<div class="row buttons">
		<?php echo CHtml::submitButton('Definir orientando'); ?>
	</div>
	
	<?php $this->endWidget(); 
	foreach(Yii::app()->user->getFlashes() as $key=>$message)
	echo '<div class="flash-"'.$key.'">'.$message."</div>\n";
	?>
	
	</div>
	
